#include "simdisk.h"

#ifndef __FS_H
#define __FS_H

#ifndef NULL
#define NULL ((void*)0)
#endif

#define SD_DIRTYPE 1
#define SD_FILETYPE 2
struct sd_info_s {
  int type;
  unsigned int size;
};
typedef struct sd_info_s sd_info_t;

int         sd_close(int fd);
sd_info_t*  sd_info(const char* filename);
int         sd_mkdir(const char* dirname);
int         sd_mount(const char* device, const char* mount_point);
int         sd_open(const char* filename, int create);
int         sd_read(int fd, void* buf, int nbyte);
char**      sd_readdir(const char* dirname);
int         sd_rename(const char* oldname, const char* newname);
int         sd_rmdir(const char* dirname);
int         sd_rmfile(const char* filename);
int         sd_umount(const char* mount_point);
int         sd_write(int fd, const void* buf, int nbyte);

#endif /* __FS_H */
